From: Aaron Schulz Date: Wed, 10 Dec 2008 15:30:46 +0000 (+0000) Subject: Init $parserCache only as needed X-Git-Tag: 1.31.0-rc.0~44066 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=208502dde8131e65ceef856f8c18ef114f261dae;p=lhc%2Fweb%2Fwiklou.git Init $parserCache only as needed --- diff --git a/includes/Article.php b/includes/Article.php index bc7cd963e5..07fb6593c2 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -678,9 +678,6 @@ class Article { wfProfileIn( __METHOD__ ); - $parserCache = ParserCache::singleton(); - $ns = $this->mTitle->getNamespace(); # shortcut - # Get variables from query string $oldid = $this->getOldID(); @@ -688,6 +685,7 @@ class Article { if( $oldid === 0 && $this->checkTouched() ) { global $wgUseETag; if( $wgUseETag ) { + $parserCache = ParserCache::singleton(); $wgOut->setETag( $parserCache->getETag($this,$wgUser) ); } if( $wgOut->checkLastModified( $this->getTouched() ) ){ @@ -702,6 +700,7 @@ class Article { } } + $ns = $this->mTitle->getNamespace(); # shortcut $sk = $wgUser->getSkin(); # getOldID may want us to redirect somewhere else